entity mux2 is

	port (
		entrada0 : in bit_vector (31 downto 0);
		entrada1 : in bit_vector (31 downto 0);
		seletor : in bit;
		saida : out bit_vector (31 downto 0)
	);
end mux2;

architecture arc_mux2 of mux2 is

begin
	
	process (entrada0, entrada1, seletor)
	
		variable resultado : bit_vector (31 downto 0);	
		
		begin
			if(seletor = '0') then
				resultado := entrada0;
			else 
				resultado := entrada1;
			end if;
			
			saida <= resultado;
	end process;
	
	
end arc_mux2;